import React from 'react'
import '../../assets/css/home.css'
import banner from '../../assets/img/classification_banner@2x.png'
import pic from '../../assets/img/classification_image@2x.png'

class Home extends React.Component{
  constructor(props) {
    super(props)
  }
  render() {
    return (
        <div className="Home">
            <div className="input">
                <input type="text" value="国家级铜雕"></input>
            </div>
            <div className="contentBox">
                <div className="contentList">
                    <ul>
                        {
                            this.props.hlist.map((i,idx) => {
                                return (
                                    <li
                                        className = {this.props.hflag ? 'bgcolor' : ''}
                                        key = {idx}
                                        onClick = {this.handleClick.bind(this,idx)}
                                    >
                                        <span className = {this.props.hflag ? 'change' : ''}>{i}</span>
                                    </li>
                                )
                            })
                        }
                    </ul>
                </div>
                <div className="contentImg">
                    <div className="banner">
                        <img src={banner}></img>
                    </div>
                    <div className="pic">
                        <img src={pic}></img>
                    </div>
                </div>
            </div>
        </div>
    )
  }
  handleClick(idx) {
      console.log(idx);
      const {click} = this.props;
      click();
  }
}
export default Home